Allow configuring the script filename casing rule - #78119
Conversation
|
There is a minor issue where adding script to Node2D with pascal case will name the script Node2d. Not sure how to fix it best tbh. Probably it's not important, because scripts are supposed to have different name. |
|
Do you think this can be in for Godot Engine 4.2? |
|
We are in feature freeze, so probably not. |
21d079e to
882eb30
Compare
|
Do you think this can be in for Godot Engine 4.3? Edited: There are some github actions problems preventing merge. |
It does not seem related to my changes, so I assume it's a problem with the tests. |
882eb30 to
31ceac0
Compare
31ceac0 to
3cf51c6
Compare
|
@raulsntos Thanks for testing! I believe I've fixed both issues, as well as cleaning up the code further (it had a confusingly named variable "current_language" which contained outdated values after my changes). |
raulsntos
left a comment
There was a problem hiding this comment.
Works as expected now, thank you!
Defaults to "Auto", which detects the casing based on the preference of the currently selected language (C# for example prefers PascalCase whereas GDScript prefers snake_case).
3cf51c6 to
2bd714e
Compare
|
Thanks! |
Allow configuring the script filename casing rule
Allow configuring the script filename casing rule


Supersedes #41991
Closes godotengine/godot-proposals#1211
Bugsquad edit: Closes godotengine/godot-proposals#5956
editor/naming/script_name_casingwhich works similar to the scene equivalent.configand_language_changed. And the logic was also overly complex, with the amount of helper methods available to manipulate strings as file paths.editor/naming/scene_name_casingfor consistency, as it has also been added for script name.TODO
Find out whatOne is for the resource loader/saver, the other is for the script language.get_recognized_extensionsis and how it differs fromget_extension.ScriptLanguageExtension changes cause an error that I can not figure out.Needed to bind the enum, fixed.